{include file='_header'}
<style type='text/css'>
    .ordertable { width:100%;position: relative;margin-bottom:10px}
    .ordertable tr td:first-child { text-align: right }
    .ordertable tr td {padding:10px 5px 0;vertical-align: top}
    .ordertable1 tr td { text-align: right; }
    .ops .btn { padding:5px 10px;}
    .order-container{
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }
    .order-container-left{
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }
    .order-container-static{
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        padding: 30px 50px 0;
    }
    .font18{
        font-size:20px;
        font-weight:bold;;
    }
    .trbagpack span{
        margin: 0 10px;
        display: inline-block;
        vertical-align: middle;
    }
    .trbagpack span.address{
        width:150px;
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
    }
    tfoot .price{
        float: right;
    }
    tfoot .price-inner{
        display: inline-block;
        vertical-align: middle;
        width:100px;
        text-align: right;
    }
    .packbag-group{
        border:1px solid #efefef;
    }
    .packbag{
        padding: 0 30px;
    }
    .packbag-title{
        line-height: 33px;
    }
    .packbag-group .packbag-list{
        padding: 20px 33px;
        border-bottom: 1px solid #efefef;
        display: flex;
        align-items: center;
    }
    .packbag-list .packbag-media{
        width:100px;
    }
    .packbag-list .packbag-inner{
        border-left:1px solid #efefef;
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }
    .packbag-goods-list{
        display: flex;
        flex-wrap: wrap;
        width:100%;
    }
    .packbag-goods{
        width:25%;
        display: flex;
        display: -webkit-flex;
        margin: 10px 0 5px;
    }
    .packbag-goods-media{
        width:52px;
        height: 52px;
        margin-right: 10px;
    }
    .packbag-goods-media img{
        width:52px;
        height: 52px;
        border: 1px solid #efefef;
    }
    .packbag-goods-inner{
        flex:1;
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        overflow: hidden;
    }
    .packbag-goods-inner p{
        color: #999;
    }
    .packbag-goods-inner .title{
        width:100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .table .trorder td{
        border-right:1px solid #efefef;
    }
    .table .trorder td:nth-of-type(1){
        border:none;
    }
</style>
<div class="page-header">
    当前位置：<span class="text-primary">订单详情</span>
</div>
<div class="page-content">
{if $item['status']!=-1}
<div class="step-region" >
    <ul class="ui-step ui-step-4" >
        <li {if 0<=$item['status']}class="ui-step-done"{/if}>
        <div class="ui-step-number" >1</div>
        <div class="ui-step-title" >买家下单</div>
        <div class="ui-step-meta" >{if 0<=$item['status']}{:date('Y-m-d',$item['createtime'])}<br/>{:date('H:i:s',$item['createtime'])}{/if}</div>
        </li>
        <li {if !empty($item['paytime']) || $item['paytype']==3}class="ui-step-done"{/if}>
        <div class="ui-step-number">2</div>
        <div class="ui-step-title">{if $item['paytype']==3}货到付款{else}买家付款{/if}</div>
        <div class="ui-step-meta">{if $item['paytype']==3}{php $item['paytime'] = $item['cashtime']}{/if}{if 1<=$item['status'] || $item['paytype']==3}{:date('Y-m-d',$item['paytime'])}<br/>{:date('H:i:s',$item['paytime'])}{/if}</div>
        </li>
        <li {if 2<=$item['status']}class="ui-step-done"{/if}>
        <div class="ui-step-number" >3</div>
        <div class="ui-step-title">{if $item['isverify'] == 1}
            确认使用
            {elseif !empty($item['addressid'])}
            商家发货
            {elseif !empty($item['isvirtualsend']) || !empty($item['virtual'])}
            自动发货
            {else}
            确认取货
            {/if}</div>
        <div class="ui-step-meta" >{if 2<=$item['status']}{:date('Y-m-d',$item['sendtime'])}<br/>{:date('H:i:s',$item['sendtime'])}{/if}</div>
        </li>
        <li {if 3<=$item['status']}class="ui-step-done"{/if}>
        <div class="ui-step-number" >4</div>
        <div class="ui-step-title">订单完成</div>
        <div class="ui-step-meta">{if 3<=$item['status']}{:date('Y-m-d',$item['finishtime'])}<br/>{:date('H:i:s',$item['finishtime'])}{/if}</div>
        </li>
    </ul>
</div>
{/if}
<form class="form-horizontal form" action="" method="post">
    <input type="hidden" name="id" value="{$item['id']}" />
    <input type="hidden" name="dispatchid" value="{$dispatch['id']}" />
    <div  class='row order-container'>
        <div class="order-container-left" style="border-right: 1px solid #efefef;">
            <div class='panel-body' >
                <div class="form-group" style='padding:0 10px;'>
                    <table class='ordertable' style='table-layout:fixed'>
                        <tr>
                            <td style='width:80px'>订单编号：</td>
                            <td>{$item['ordersn']}</td>
                        </tr>
                        <tr>
                            <td>订单金额：</td>
                            <td>￥{:number_format($item['price'],2)}</td>
                        </tr>

                        {if !empty($coupon)}
                        <tr>
                            <td>优惠券：</td>
                            <td><a href="javascript:;" target='_blank'>{$coupon['couponname']}</a> &nbsp;&nbsp;<a data-toggle='popover' data-trigger="hover" data-html='true' data-placement='right' data-content="<table style='width:100%;'>
                                <tr>
                                    <td style='border:none;text-align:right;'>优惠方式：</td>
                                    <td style='border:none;text-align:right;'>
                                    {if $coupon['backtype']==0}
                                        立减 {$coupon['deduct']} 元
                                    {elseif $coupon['backtype']==1}
                                        打 {$coupon['discount']} 折
                                    {elseif $coupon['backtype']==2}
                                        {if $coupon['backmoney']>0}返 {$coupon['backmoney']} 余额{/if}
                                        {if $coupon['backcredit']>0}返 {$coupon['backcredit']} 积分{/if}
                                        {if $coupon['backredpack']>0}返 {$coupon['backredpack']} 红包{/if}
                                    {/if}
                                    </td>
                                </tr>


                                {if $coupon['backtype']==2}
                                    <tr>
                                        <td style='border:none;text-align:right;'>返利方式：</td>
                                        <td style='border:none;text-align:right;'>
                                        {if $item['backwhen']==0}
                                            交易完成后(过退款期限)
                                        {elseif $item['backwhen']==1}
                                            订单完成后(收货后)
                                        {else}
                                            订单付款后
                                        {/if}
                                        </td>
                                    </tr>

                                    <tr>
                                        <td style='border:none;text-align:right;'>返利情况：</td>
                                        <td style='border:none;text-align:right;'>
                                        {if empty($coupon['back'])}
                                            未返利
                                        {else}
                                            已返利
                                        {/if}
                                        </td>
                                    </tr>

                                    {if !empty($coupon['back'])}
                                    <tr>
                                        <td style='border:none;text-align:right;'>返利时间：</td>
                                        <td style='border:none;text-align:right;'>{:date('Y-m-d H:i',$coupon['backtime'])}</td>
                                    </tr>
                                    {/if}
                                {/if}
                            </table>
                            "><i class='icow icow-help'></i>
                            </a>
                            </td>
                        </tr>
                        {/if}
                        <tr>
                            <td style='width:80px'>付款方式：</td>
                            <td> {if $item['paytype'] == 0}未支付{/if}
                                {if $item['paytype'] == 1}余额支付{/if}
                                {if $item['paytype'] == 11}后台付款{/if}
                                {if $item['paytype'] == 21}微信支付{/if}
                                {if $item['paytype'] == 22}支付宝支付{/if}
                                {if $item['paytype'] == 23}银联支付{/if}
                                {if $item['paytype'] == 3}货到付款{/if}</td>
                        </tr>
                        <tr>
                            <td>买家：</td>
                            <td><a href="javascript:;" target='_blank'>{$member['nickname']}</a> &nbsp;&nbsp;<a data-trigger="hover" data-toggle='popover' data-html='true' data-placement='right' data-content="<table style='width:100%;'>
                                <tr>
                                    <td  style='border:none;text-align:right;' colspan='2'><img src='{$member['avatar']}' style='width:100px;height:100px;padding:1px;border:1px solid #ccc' /></td>
                                </tr>
                                <tr>
                                    <td  style='border:none;text-align:right;'>ID：</td>
                                    <td  style='border:none;text-align:right;'>{$member['id']}</td>
                                </tr>
                                <tr>
                                    <td  style='border:none;text-align:right;'>昵称：</td>
                                    <td  style='border:none;text-align:right;'>{$member['nickname']}</td>
                                </tr>
                                <tr>
                                    <td  style='border:none;text-align:right;'>姓名：</td>
                                    <td  style='border:none;text-align:right;'>{$member['realname']}</td>
                                </tr>
                                <tr>
                                    <td  style='border:none;text-align:right;'>手机号：</td>
                                    <td  style='border:none;text-align:right;'>{$member['mobile']}</td>
                                </tr>
                                <tr>
                                    <td  style='border:none;text-align:right;'>微信号：</td>
                                    <td  style='border:none;text-align:right;'>{$member['weixin']}</td>
                                </tr>
                                </table>
                            "><i class='icow icow-help'></i>
                            </a>
                            </td>
                        </tr>
                        {if !empty($item['invoicename'])}
                        <tr>
                            <td style='width:80px'>发票抬头：</td>
                            <td>{$item['invoicename']}</td>
                        </tr>
                        {/if}
                    </table>

                    <table class='ordertable' style='table-layout:fixed;border-top:1px dotted #ccc'>
                        <tr>
                            <td style='width:80px'>配送方式：</td>
                            <td>
                                {if $item['isverify'] == 1}
                                    线下核销
                                {elseif !empty($item['addressid'])}
                                    快递
                                {elseif !empty($item['isvirtualsend']) || !empty($item['virtual'])}
                                    自动发货{if !empty($item['isvirtualsend'])}(虚拟物品){else}(虚拟卡密){/if}
                                {elseif $item['dispatchtype']}
                                    自提
                                {else}
                                    其他
                                {/if}
                            </td>
                        </tr>

                        {if $item['isverify']==1}
                            <tr>
                                <td style='width:80px'>核销方式：</td>
                                <td>{if $item['verifytype']==0}

                                    整单核销
                                    {elseif $item['verifytype']==1}
                                    按次核销
                                    {elseif $item['verifytype']==2}
                                    按消费码核销
                                    {/if}
                                </td>
                            </tr>

                            {if $item['verifytype']==0}
                                <tr>
                                    <td style='width:80px'>消费码：</td>
                                    <td>{$item['verifycode']}</td>
                                </tr>
                                {if $item['verified']}
                                <tr>
                                    <td style='width:80px'>核销时间：</td>
                                    <td>{:date('Y-m-d H:i:s', $item['verifytime'])}</td>
                                </tr>
                                {if !empty($saler)}
                                <tr>
                                    <td style='width:80px'>核销人：</td>
                                    <td>{$saler['nickname']}( {$saler['salername']} )</td>
                                </tr>
                                {/if}
                                {if !empty($store)}
                                <tr>
                                    <td style='width:80px'>核销门店：</td>
                                    <td>{$store['storename']}</td>
                                </tr>
                                {/if}
                            {/if}

                        {elseif $item['verifytype']==1}
                        <tr>
                            <td style='width:80px'>消费记录：</td>
                            <td>
                                <a href='javascript:;' onclick='$("#verify-modal").modal()'><i class="fa fa-question-circle"></i> 查看</a>

                                <div id="verify-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">

                                    <div class="modal-dialog" style='width:850px'>
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
                                                <h3>核销记录</h3>
                                            </div>
                                            <div class="modal-body" >
                                                <div style='max-height:500px;overflow:auto;min-width:800px;'>
                                                    <table style='width:100%;' class='table'>
                                                        <tr><td style='width:150px'>时间</td><td style='width:100px'>核销员</td><td>门店</td></tr>
                                                        {loop $verifyinfo $v}
                                                            <tr><td>{:date('Y-m-d H:i',$v['verifytime'])}</td><td>{$v['salername']}<br/><small>{$v['nickname']}</small></td><td>{$v['storename']}</td></tr>
                                                        {/loop}
                                                    </table>
                                                </div>
                                            </div>
                                            <div class="modal-footer">

                                                <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {elseif $item['verifytype']==2}
                        <tr>
                            <td style='width:80px'>消费码：</td>
                            <td>{$item['verifycode']}</td>
                        </tr>
                        {foreach name="verifyinfo" item="v"}
                        {if $v['verified']}
                        <tr>
                            <td style='width:80px'>{$v['verifycode']}</td>
                            <td>
                                <a data-toggle='popover' data-html='true' data-placement='right'
                                   data-content="<table style='width:100%;'>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>核销员：</td>
                                        <td  style='border:none;text-align:right;'>{$v['salername']}/{$v['nickname']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>门店：</td>
                                        <td  style='border:none;text-align:right;'>{$v['storename']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>时间：</td>
                                        <td  style='border:none;text-align:right;'>{:date('Y-m-d H:i',$v['verifytime'])}</td>
                                    </tr>

                                    </table>" >
                                <i class="fa fa-question-circle"></i> 使用信息</a>
                            </td>
                        </tr>
                        {/if}
                        {/foreach}

                        {/if}

                        {/if}

                        {if !empty($item['addressid'])}
                        <tr>
                            <td style='width:80px'>收货人：</td>
                            <td style='word-break: break-all;white-space: normal'>
                                {$user['address']}, {$user['realname']}, {$user['mobile']} <a class='js-clip' data-url="{$user['address']}, {$user['realname']}, {$user['mobile']}">[复制]</a></td>
                        </tr>

                        {elseif $item['isverify']==1 || !empty($item['virtual']) ||!empty($item['isvirtual'])}
                            {if $item['status']>=2 && !empty($item['virtual']) }
                                <tr>
                                    <td style='width:80px'>发货信息：</td>
                                    <td style='word-break: break-all;white-space: normal'>{:str_replace("\n","<br/>", $item['virtual_str'])}</td>
                                </tr>
                            {/if}

                            <tr>
                                <td style='width:80px'>联系人：</td>
                                <td style='word-break: break-all;white-space: normal'>{$user['carrier_realname']}, {$user['carrier_mobile']}</td>
                            </tr>
                        {else}
                            <tr>
                                <td style='width:80px'>自提码：</td>
                                <td>{$item['verifycode']}</td>
                            </tr>
                            <tr>
                                <td style='width:80px'>自提人：</td>
                                <td style='word-break: break-all;white-space: normal'>{$user['address']},  {$user['realname']}, {$user['mobile']}</td>
                            </tr>
                        {/if}

                        {if !empty($item['remark'])}
                        <tr>
                            <td style='width:80px'>买家备注：</td>
                            <td>{$item['remark']}</td>
                        </tr>
                        {/if}

                        {if !empty($item['addressid'])}
                        <tr>
                            <td style='width:80px'></td>
                            <td style='word-break: break-all;white-space: normal'><a class="btn btn-primary btn-xs" data-toggle="ajaxModal" href="{:url('merch/order/changeaddress', array('id' => $item['id']))}">编辑收货信息</a></td>
                        </tr>
                        {/if}

                    </table>
                </div>
            </div>
        </div>
        <div class="order-container-static" >
            <div class='panel-body' style='height:380px;' >
                <div class='row'>
                    <span>订单状态：</span>
                        <span class="form-control-static">
                            {if $item['status'] == 0}
                            {if $item['paytype']==3}
                            <span class=" text-warning font18">待发货</span>
                            {else}
                            <span class=" text-danger font18">待付款</span>
                            {/if}
                            {/if}
                            {if $item['status'] == 1}
                                <span class="text-warning font18">
                                {if $item['isverify'] == 1}
                                    待使用
                                {elseif empty($item['addressid'])}
                                    待取货
                                {else}
                                    待发货
                                {/if}
                                </span>
                            {/if}
                            {if $item['status'] == 2}<span class="text-warning font18">待收货</span>{/if}
                            {if $item['status'] == 3}<span class="text-success font18">交易完成</span>{/if}
                            {if $item['status'] == -1}
                            <span class="text-default">已关闭</span>
                            {/if}
                        </span>
                        <span class="form-control-static">
                            {if $item['status'] == 0}
                            {if $item['paytype']==3}
                            （此订单为货到付款订单，请商家尽快发货）
                            {else}
                           （ 等待买家付款）
                            {/if}
                            {/if}
                            {if $item['status'] == 1}（买家已经付款，请商家尽快发货）{/if}
                            {if $item['status'] == 2}（商家已发货，等待买家收货并交易完成）{/if}
                            {if $item['status'] == -1}
                            {if !empty($refund) && $refund['status']==1}
                            <span class="label label-default">（已维权）</span> {if !empty($refund['refundtime'])}维权时间: {:date('Y-m-d H:i:s',$refund['refundtime'])}{/if}
                            {/if}
                            {/if}
                        </span>

                    {if !empty($item['expresssn']) && $item['status']>=2 && !empty($item['addressid'])}
                    <div class="form-control-static">
                        快递公司: {if empty($item['expresscom'])}其他快递{else}{$item['expresscom']}{/if}<br>
                        快递单号: {$item['expresssn']} &nbsp;&nbsp;<a class='op' data-toggle="ajaxModal" href="{:url('merch/util/express', array('id' => $item['id'],'express'=>$item['express'],'expresssn'=>$item['expresssn']))}">查看物流</a><br>
                        发货时间: {:date('Y-m-d H:i:s', $item['sendtime'])}
                    </div>
                    {/if}
                </div>
                <div >
                    <p class="form-control-static ops">
                        <?php $detial_flag = 1;?>{if $item['isluckbuy'] == 1 && (empty($item['lotterylog']) || $lotterylog['lotterylog']['is_reward'] != -1)} {else}{include file='order/ops'}{/if}
                        &nbsp;&nbsp;
                        {if $item['status'] ==0 && $merch_user['changepricechecked'] == 1}
                        <a class='op'  data-toggle='ajaxModal' href="{:url('merch/order/changeprice',array('id'=>$item['id']))}">订单改价</a>&nbsp;&nbsp;
                        {/if}

                        <a  data-toggle="ajaxModal" href="{:url('merch/order/remarksaler', array('id' => $item['id']))}" {if !empty($item['remarksaler'])}style='color:red'{/if} >备注</a>
                    </p>
                </div>


                {if $item['status'] >0}
                <div class='order-tips'>
                    <div class='row order-tips-title'>友情提醒</div>

                    {if $item['status'] == 0}
                    {if $item['paytype']==3}
                    <div class='row order-tips-row'>订单为货到付款，请您务必联系买家确认后再进行发货</div>
                    {else}
                    <div class='row order-tips-row'>您可以联系买家进行付款，否则订单会根据设置自动关闭</div>
                    {/if}
                    {/if}
                    {if $item['status'] == 1}
                    <div class='row order-tips-row'>如果无法进行发货，请及时联系买家进行妥善处理;</div>
                    {/if}
                    {if $item['status'] == 2}
                    <div class='row order-tips-row'>请及时关注物流状态，确保买家及时收到商品;</div>
                    <div class='row order-tips-row'>如果买家未收到货物或有退换货请求，请及时联系买家妥善处理</div>
                    {/if}

                    {if $item['status']==3}
                    <div class='row order-tips-row'>交易成功，如买家有售后申请，请与买家进行协商，妥善处理</div>
                    {/if}
                </div>
                {/if}


            </div>

        </div>
        {if m('commission') && count($agents)>0 && $merch_user['commissionchecked'] == 1}
        <div class="distribution col-sm-4 col-md-3">
            <div class="row" style="margin: 20px 0 0 10px;">

                {foreach name="agents" key="key" item="value"}

                <div class="">

                    {if !empty($value)}
                    <h4 class="m-t-none m-b">
                        {if $key == 0}
                        一级分销商
                        {elseif $key == 1}
                        二级分销商
                        {elseif $key == 2}
                        三级分销商
                        {/if}
                    </h4>
                    <div class="form-group" style='padding:0 10px;'>
                        <table class='ordertable' style='table-layout:fixed'>
                            <tr>
                                <td style='width:80px'>姓名：</td>
                                <td>{$value['realname']} &nbsp;&nbsp;<a data-toggle='popover' data-html='true' data-placement='right' data-content="<table style='width:100%;'>
                                    <tr>
                                        <td  style='border:none;text-align:right;' colspan='2'><img src='{$value['avatar']}' style='width:100px;height:100px;padding:1px;border:1px solid #ccc' /></td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>ID：</td>
                                        <td  style='border:none;text-align:right;'>{$value['id']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>昵称：</td>
                                        <td  style='border:none;text-align:right;'>{$value['nickname']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>姓名：</td>
                                        <td  style='border:none;text-align:right;'>{$value['realname']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>手机号：</td>
                                        <td  style='border:none;text-align:right;'>{$value['mobile']}</td>
                                    </tr>
                                    <tr>
                                        <td  style='border:none;text-align:right;'>微信号：</td>
                                        <td  style='border:none;text-align:right;'>{$value['weixin']}</td>
                                    </tr>
                                    </table>
                                "><i class='fa fa-question-circle'></i>
                                </a>
                                </td>
                            </tr>

                            <tr>
                                <td style='width:80px'>手机号：</td>
                                <td>{$value['mobile']}</td>
                            </tr>

                            <tr>
                                <td style='width:80px'>佣金：</td>
                                <td>{$value['commission']}</td>
                            </tr>

                        </table>
                    </div>
                    {/if}

                </div>
                {/foreach}
            </div>
            <br>

        </div>
        {/if}
    </div>

    <br>


        <h3 class="order-title">商品信息</h3>
        <div class="panel-body table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                <tr  class="trorder">
                    <th style="width:80px">标题</th>
                    <th ></th>
                    <th style="padding-left: 20px">规格/编号/条码</th>
                    <th style="text-align: center" >单价(元)/数量</th>
                    <th style="text-align: center">数量</th>
                    <th  style="text-align: center">折扣前（元）</th>
                    <th style="text-align: center">折扣后（元）</th>
                </tr>
                </thead>
                {foreach name="item['goods']" item="goods"}
                <tr  class="trorder">
                    <td>
                        <img src="{:tomedia($goods['thumb'])}" style='width:70px;height:70px;border:1px solid #efefef; padding:1px;'onerror="this.src='/public/static/images/nopic.png'">
                    </td>
                    <td class='full'>
                        {if $category[$goods['pcate']]['name']}
                        <span class="text-error">[{$category[$goods['pcate']]['name']}] </span>{/if}{if $children[$goods['pcate']][$goods['ccate']][1]}
                        <span class="text-info">[{$children[$goods['pcate']][$goods['ccate']][1]}] </span>
                        {/if}
                        {$goods['title']} {if !empty($goods['invoice'])}<label class='label label-danger'>支持开票</label>{/if}
                    </td>
                    <td style="padding: 10px 20px">{if !empty($goods['optionname'])}规格：<span class="label label-info">{$goods['optionname']}</span>{/if}
                        {if !empty($goods['goodssn'])}<br/>编码:{$goods['goodssn']}{/if}
                        {if !empty($goods['productsn'])}<br/>条码:{$goods['productsn']}{/if}</td>
                    <td style="text-align: center">{$goods['marketprice']}
                    </td>
                    <td style="text-align: center">{$goods['total']}个</td>
                    <td style="text-align: center" >
                        {$goods['orderprice']}
                    </td>
                    <td style="text-align: center">
                        {$goods['realprice']}
                        {if intval($goods['changeprice'])!=0}
                        <br/>(改价{if $goods['changeprice']>0}+{/if}{:number_format(abs($goods['changeprice']),2)})
                        {/if}
                    </td>
                </tr>
                {/foreach}
                <tfoot style="padding-top: 20px">
                <tr class="trorder">
                    <td colspan="2" style="padding-left: 20px"> {if $item['ispackage']}
                        <span class="text-danger" style="color:red;">（套餐优惠价：&yen;{:number_format($item['price'],2)}{if $item['dispatchprice'] }，含运费：&yen;{:number_format($item['dispatchprice'],2)}{/if}）</span>
                        {/if}
                    </td>
                    <td colspan="5" style="padding-right: 60px">
                    <div class="price">
                        <p> <span class="price-inner">商品小计：</span><span style="font-weight: bold">￥{$item['goodsprice']}</span></p>
                        <p><span class="price-inner">运费：</span>￥{$item['olddispatchprice']}</p>
                        {if !$item['ispackage']}
                        {if $item['taskdiscountprice']>0 }
                        <p><span class="price-inner">任务活动优惠：</span><span class="text-danger">-￥{$item['taskdiscountprice']}</span></p>
                        {/if}
                        {if $item['lotterydiscountprice']>0 }
                        <p><span class="price-inner">游戏活动优惠：</span><span class="text-danger">-￥{$item['lotterydiscountprice']}</span></p>
                        {/if}
                        {if $item['discountprice']>0 }
                        <p><span class="price-inner">会员折扣：</span><span class="text-danger">-￥{$item['discountprice']}</span></p>
                        {/if}
                        {if $item['deductprice']>0 }
                        <p><span class="price-inner">积分抵扣：</span><span class="text-danger">-￥{$item['deductprice']}</span></p>
                        {/if}
                        {if $item['deductcredit2']>0 }
                        <p><span class="price-inner">余额抵扣：</span><span class="text-danger">-￥{$item['deductcredit2']}</span></p>
                        {/if}
                        {if $item['deductenough']>0 }
                        <p><span class="price-inner">商城满额立减：</span><span class="text-danger">-￥{$item['deductenough']}</span></p>
                        {/if}
                        {if $item['merchdeductenough']>0 }
                        <p><span class="price-inner">商户满额立减：</span><span class="text-danger">-￥{$item['merchdeductenough']}</span></p>
                        {/if}
                        {if $item['couponprice']>0 }
                        <p><span class="price-inner">优惠券优惠：</span><span class="text-danger">-￥{$item['couponprice']}</span></p>
                        {/if}
                        {if $item['isdiscountprice']>0 }
                        <p><span class="price-inner">促销优惠：</span><span class="text-danger">-￥{$item['isdiscountprice']}</span></p>
                        {/if}
                        {if $item['buyagainprice']>0 }
                        <p><span class="price-inner">重复购买优惠：</span><span class="text-danger">-￥{$item['buyagainprice']}</span></p>
                        {/if}
                        {if $item['seckilldiscountprice']>0 }
                        <p><span class="price-inner">秒杀优惠：</span><span class="text-danger">-￥{$item['seckilldiscountprice']}</span></p>
                        {/if}
                        {/if}
                        {if intval($item['changeprice'])!=0}
                        <p>
                            <span class="price-inner">卖家改价：</span>
                            <span style='{if 0<$item['changeprice']}color:green{else}color:red{/if}'>{if 0<$item['changeprice']}+{else}-{/if}￥{:number_format(abs($item['changeprice']),2)}</span>
                        </p>
                        {/if}
                        {if intval($item['changedispatchprice'])!=0}
                        <p>
                            <span class="price-inner">卖家改运费：</span>
                            <span style='{if 0<$item['changedispatchprice']}color:green{else}color:red{/if}'>{if 0<$item['changedispatchprice']}+{else}-{/if}￥{:abs($item['changedispatchprice'])}</span>
                        </p>
                        {/if}
                        <p><span class="price-inner">实付款：</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">￥{$item['price']}</span></p>
                    </div>
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
</form>
</div>
<script language='javascript'>
</script>

{include file='_footer'}
